package com.common.retrofit.methods;

import com.common.retrofit.base.BaseMethods;
import com.common.retrofit.service.HaiNingService;

import rx.Observable;
import rx.Subscriber;

public class OrderIntrueMethods extends BaseMethods {

    private static OrderIntrueMethods m_ins = null;

    public static OrderIntrueMethods getInstance() {
        if (m_ins == null) {
            synchronized (OrderIntrueMethods.class) {
                if (m_ins == null) {
                    m_ins = new OrderIntrueMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "Order/";
    }

    private HaiNingService initService() {
        return getRetrofit().create(HaiNingService.class);
    }


    public void done(Subscriber<Object> subscriber,
                      int uid ,
                      String hashid  ,String orderId) {
        Observable observable = initService().done(System.currentTimeMillis()+"",
                "d7d64bd6ee14f8b6030680fa9d9acc72",uid,hashid,orderId
        );
        toSubscribe(observable, subscriber);
    }
}
